1. Field of the Invention
The present invention relates generally to a computer system having a shared system memory, and more particularly to system software in a computer system having a shared system memory.
2. Related Art
FIG. 1 is a block diagram of a conventional computer system 102. The computer system 102 is "bus centric," in that all components are connected to and communicate with each other via a bus 116. In particular, a CPU 104 (central processing unit), system memory 106, graphics rendering hardware 108, and an I/O (input/output) interface 118 are connected to a bus 116, and communicate with each other via the bus 116.
The system memory 106 is the main memory in the computer system 102, and it is implemented as random access memory (RAM). However, the system memory 106 is not the only RAM in the computer system 102. The computer system 102 also includes a frame buffer 110 in a graphics memory 109, which is implemented using VRAM (video random access memory). The graphics memory 109 and the frame buffer 110 located therein are dedicated for use by the rendering hardware 108. In operation, the rendering hardware 108 performs graphical operations and renders a graphical image to the frame buffer 110. A graphics back end (GBE) 112 displays the graphical image on a graphics monitor 114.
The computer system 102 also includes a video buffer RAM 122 that is used for direct communication of video data to the compression module 124 (which may represent a video compression computer card, for example). There is also a compression RAM 123 that is used for compression operations. In operation, a video source 120 (such as a video camera) generates a video signal. The bandwidth of the video signal is approximately 20 Mbytes/second. Typically, "consumers" or "users" of the video signal have a smaller bandwidth. For example, the storage device 126 (such as a disk drive) usually has a bandwidth of 2-4 Mbytes/second. A communication network (not shown) usually has a bandwidth of approximately 1 Mbyte/second. Thus, it is necessary to compress the video signal.
Accordingly, the video signal is stored in the video buffer RAM 122. The compression module 124 compresses the video data stored in the video buffer RAM 122 using the compression RAM 123 to hold compression task state information such as inter-frame reference data, and then transfers the compressed video data to the I/O interface 118. The I/O interface 118 sends the compressed video data to an external device, such as a storage device 126 or to a destination over a communication network (not shown). In other systems, data is transferred directly from the compression module 124 to the storage device 126 or other external device.
Thus, the computer system 102 has multiple RAMS: the system memory 106, the graphics memory 109, the video buffer RAM 122, and the compression RAM 123. It is costly to have multiple RAMS. This cost manifests itself in increased system cost (since more RAMs cost more money) and increased system size (since more RAMs take up more space). Thus, the conventional computer system 102 is not ideal since it requires multiple RAMS.
The system memory 106 is general purpose, but the graphics memory 109, the video buffer RAM 122, and the compression RAM 123 are dedicated to specific functions. The graphics memory 109 can be used only for graphics operations, and the video buffer RAM 122 and compression RAM 123 can be used only for compression operations. Thus, a significant portion of the RAM in the computer system 102 can be used only for particular functions. Accordingly, the conventional computer system 102 is not ideal because its RAMs are not flexible.
The inflexibility of the compression RAM 122 extends to the entire video compression path. The compression module 124 and compression RAM 122 that comprise the video compression path are capable of opening with a single video signal. Thus, the compression path of the conventional computer system 102 is inflexible because it cannot simultaneously work with multiple video signals.
Also, the compression module 124 and compression RAM 122 can only work with one video signal type. The type of video signal that the compression module 124 and compression RAM 122 can work with is determined when the computer system 102 is manufactured. Thus, the compression path of the conventional computer system 102 is inflexible because it cannot work with multiple types of video signals.
This latter inflexibility of the compression path, and the inflexibility of the computer system 102 as a whole, results from its manner of operation. As shown in FIG. 2, processing of a video signal by the conventional computer system 102 is performed entirely by hardware 208 (the hardware 208 includes the video buffer RAM 122, the compression RAM 123, compression module 124, and I/O interface 118). Such processing is represented by path 212, which does not extend into the operating system layer 206 or the user application layer 204. Since it is performed entirely by hardware 208, video compression functionalities and capabilities are essentially "hardwired" into the computer system 102. Thus, the compression device 124 and other related hardware have limited applicability because they are hardwired to and embedded in the video input/output path.
This inflexibility can be alleviated somewhat by enabling user applications in the user application layer 204, and executing in the CPU 104, to manipulate the video signal. To do this, graphical data representative of the video signal must be copied from the graphics memory 109 into the system memory 106. A user application can then manipulate the graphical data while it is stored in the system memory 106 (note that the user application does not have access to data stored in the graphics memory 109). In order to display the graphical data, the graphical data must be copied from the system memory 106 back to the graphics memory 109 (in particular, back to the frame buffer 110 in the graphics memory 109).
Thus, in order to obtain some level of flexibility in the system 102 of FIG. 1, it is necessary to copy and/or move data from one memory component to another memory component, such as from the graphics memory 109 to the system memory 106, and vice versa. These copy and move operations degrade system performance because they are time consuming and resource intensive. Accordingly, any flexibility in the conventional system 102 of FIG. 1 is achieved only at the cost of significant system performance.